package com.cooper.mediadb.local;

import java.util.ArrayList;
import java.util.List;

import com.cooper.scraper.show.FanartAdapter;

public abstract class LocalMediaFanartAdapter<T extends LocalMedia> extends FanartAdapter<T>{
	
	public static final int ORDER_BY_TITLE = 0;
	public static final int ORDER_BY_ADD_TIME = 1;
	public static final int ORDER_BY_MEDIA_TIME = 2;

	protected List<T> medias = new ArrayList<T>();
	
	@Override
	public int getCount() {
		return medias.size();
	}

	@Override
	public Object getItem(int position) {
		if (position < medias.size())
			return medias.get(position);
		else
			return null;
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	protected T getResource(int position) {
		return medias.get(position);
	}

}
